#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <mainwindow1.h>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //this->setWindowOpacity(0.95); // 设置透明度为95%
    this->setStyleSheet("QMainWindow::window-icon { display: none; }");
    this->setWindowTitle("B音乐");
    this->statusBar()->hide();


    connect(ui->loginbutton, &QPushButton::clicked, this, &MainWindow::onLoginClicked);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::onLoginClicked()
{
    // 创建MainWindow1的实例
    MainWindow1 *mainWindow1 = new MainWindow1(this);

    // 显示新窗口
    mainWindow1->show();

    // 隐藏当前窗口
    this->hide();
}


